package robotCross;

import abbot.finder.MultiMatcher;
import abbot.finder.MultipleComponentsFoundException;
import abbot.finder.matchers.WindowMatcher;

import java.awt.*;

/**
 * Created by hanyz on 2016/10/26.
 */
public class MultipleWindowMacher extends WindowMatcher implements MultiMatcher{

    public MultipleWindowMacher(String id) {
        super(id);
    }

    public MultipleWindowMacher(String id, boolean mustBeShowing) {
        super(id, mustBeShowing);
    }

    @Override
    public Component bestMatch(Component[] candidates) throws MultipleComponentsFoundException {
        MultipleComponentsFoundException exception = new MultipleComponentsFoundException(candidates);
        throw exception;
    }
}
